
<div class="theme-top clearfix">
    <div class="title">
        <ul class="tabs-nav">
            <li class="tabs-selected"><a href="javascript:void(0)"><?php echo 最新话题;?></a></li>
            <li><a href="javascript:void(0)"><?php echo 热门话题;?></a></li>
            <li><a href="javascript:void(0)"><?php echo 热门回复;?></a></li>
        </ul>
    </div>
    <div class="contnet theme-list">
        <?php if(!empty($new_themelist)){?>
        <ul class="tabs-panel">
            <?php foreach (($new_themelist) as $val){?>
            <li>
                <a href="<?php echo url('theme/theme_detail',array('c_id'=>$val['circle_id'],'t_id'=>$val['theme_id']));?>"class="theme-title" title="<?php echo $val['theme_name'];?>"><?php echo $val['theme_name'];?></a>
                <a href="<?php echo  url('group/index',array('c_id'=>$val['circle_id']));?>" class="group-name" title="<?php echo 话题来自.：.$val['circle_name'];?>"><?php echo $val['circle_name'];?></a>
            </li>
            <?php }?>
        </ul>
        <?php }?>
        <?php if(!empty($hot_themelist)){?>
        <ul class="tabs-panel tabs-hide">
            <?php foreach (($hot_themelist) as $val){?>
            <li>
                <a href="<?php echo url('theme/theme_detail',array('c_id'=>$val['circle_id'],'t_id'=>$val['theme_id']));?>" class="theme-title" title="<?php echo $val['theme_name'];?>"><?php echo $val['theme_name'];?></a>
                <a href="<?php echo  url('group/index',array('c_id'=>$val['circle_id']));?>" class="group-name" title="<?php echo 话题来自.：.$val['circle_name'];?>"><?php echo $val['circle_name'];?></a>
            </li>
            <?php }?>
        </ul>
        <?php }?>
        <?php if(!empty($reply_themelist)){?>
        <ul class="tabs-panel tabs-hide">
            <?php foreach (($reply_themelist) as $val){?>
            <li>
                <a href="<?php echo url('theme/theme_detail',array('c_id'=>$val['circle_id'],'t_id'=>$val['theme_id']));?>"class="theme-title" title="<?php echo $val['theme_name'];?>"><?php echo $val['theme_name'];?></a>
                <a href="<?php echo  url('group/index',array('c_id'=>$val['circle_id']));?>" class="group-name" title="<?php echo 话题来自.：.$val['circle_name'];?>"><?php echo $val['circle_name'];?></a>
            </li>
            <?php }?>
        </ul>
        <?php }?>
    </div>
</div>
<script>
    $(function() {
        $(".tabs-nav > li > a").mouseover(function(e) {
            if (e.target == this) {
                var tabs = $(this).parent().parent().children("li");
                var panels = $(this).parents('.theme-top:first').find(".tabs-panel");
                var index = $.inArray(this, $(this).parent().parent().find("a"));
                if (panels.eq(index)[0]) {
                    tabs.removeClass("tabs-selected")
                            .eq(index).addClass("tabs-selected");
                    panels.addClass("tabs-hide")
                            .eq(index).removeClass("tabs-hide");
                }
            }
        });
    });
</script>
